-
-
Notifications
You must be signed in to change notification settings - Fork 72
Document using matrix-free operators #610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
A = [-2.0 1 0 0 0 | ||
1 -2 1 0 0 | ||
0 1 -2 1 0 | ||
0 0 1 -2 1 | ||
0 0 0 1 -2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
A = [-2.0 1 0 0 0 | |
1 -2 1 0 0 | |
0 1 -2 1 0 | |
0 0 1 -2 1 | |
0 0 0 1 -2] | |
A = [-2.0 1 0 0 0 | |
1 -2 1 0 0 | |
0 1 -2 1 0 | |
0 0 1 -2 1 | |
0 0 0 1 -2] |
non-constant operators, operator algebras, and many more features). This is done by: | ||
|
||
```@example linsys1 | ||
function Afunc!(w,v,u,p,t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
function Afunc!(w,v,u,p,t) | |
function Afunc!(w, v, u, p, t) |
function Afunc!(w,v,u,p,t) | ||
w[1] = -2v[1] + v[2] | ||
for i in 2:4 | ||
w[i] = v[i-1] - 2v[i] + v[i+1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
w[i] = v[i-1] - 2v[i] + v[i+1] | |
w[i] = v[i - 1] - 2v[i] + v[i + 1] |
nothing | ||
end | ||
|
||
function Afunc!(v,u,p,t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
function Afunc!(v,u,p,t) | |
function Afunc!(v, u, p, t) |
|
||
function Afunc!(v,u,p,t) | ||
w = zeros(5) | ||
Afunc!(w,v,u,p,t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
Afunc!(w,v,u,p,t) | |
Afunc!(w, v, u, p, t) |
|
||
```@example linsys1 | ||
v = rand(5) | ||
mfopA*v - A*v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
mfopA*v - A*v | |
mfopA * v - A * v |
``` | ||
|
||
!!! note | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
Note that not all methods can use a matrix-free operator. For example, `LUFactorization()` requires a matrix. If you use an | ||
invalid method, you will get an error. The methods particularly from KrylovJL are the ones preferred for these cases | ||
(and are defaulted to). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
Note that not all methods can use a matrix-free operator. For example, `LUFactorization()` requires a matrix. If you use an | |
invalid method, you will get an error. The methods particularly from KrylovJL are the ones preferred for these cases | |
(and are defaulted to). | |
Note that not all methods can use a matrix-free operator. For example, `LUFactorization()` requires a matrix. If you use an | |
invalid method, you will get an error. The methods particularly from KrylovJL are the ones preferred for these cases | |
(and are defaulted to). |
No description provided.